package practise.trackerpoc.server;

import practise.trackerpoc.shared.PhoneProp;

import com.googlecode.objectify.annotation.Embed;
import com.googlecode.objectify.annotation.Index;

@Embed
public class Phone {
	String countryCode = "";
	String areaCode = "";
	@Index String phoneNumber = "";
	
	public Phone() {		
	}
	
	Phone(String countryCode, String areaCode, String phoneNumber) {
		this.countryCode = countryCode;
		this.areaCode = areaCode;
		this.phoneNumber = phoneNumber;
	}
	
	public String toString() {
		return countryCode + " " + areaCode + " " + phoneNumber;
	}
	
	public PhoneProp toPhoneProp() {
		return new PhoneProp(countryCode, areaCode, phoneNumber);
	}
}
